<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function Parent() {
            this.name = 'zs'
            this.age = 20
            this.arr = [1, 2, 3]
        }
        Parent.prototype.a = 200
        function Student() {
            Parent.call(this)
        }
        var obj = new Student()
        var obj1 = new Student()
        obj.arr.push(4)
        console.log(obj1);


        原型链继承(原型共享有bug)-- > 借用构造函数(call 父类上的方法不能继承)-- > 组合继承(调用)-- >
    </script>
</body>

</html>